package day02;

public class fangcheng {
	public static void main(String[] args) {
		double a = Double.parseDouble(args[0]);
		double b = Double.parseDouble(args[1]);
		double c = Double.parseDouble(args[2]);
		double dic = Math.pow(b, 2) - 4 * a * c;
		double x = 0;
		double x1 = 0;
		double x2 = 0;
		if (dic < 0)
			System.out.println("没有实数解");
		else if (dic == 0) {
			x = (-b) / (2 * a);
			System.out.println("x=" + x);
		} else {
			x1 = ((-b) + Math.sqrt(dic)) / (2 * a);
			x2 = ((-b) - Math.sqrt(dic)) / (2 * a);
			System.out.println("x1=" + x1 + "," + "x2=" + x2);
		}
	}

}
